package com.chang.bootplus.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.chang.bootplus.base.database.EntityBase;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author ning
 * @since 2022-01-26
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("product_unit")
@ApiModel(value = "ProductUnit对象", description = "")
public class ProductUnit implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty("商品的四级分类id")
//    @TableField("id")    这里不继承entityBase 是因为id不是主键了
    private Long id;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间 yyyy-MM-dd HH:mm:ss", example = "2020-11-28 00:12:23", required = true)
    @JsonFormat(timezone = "GMT+8", shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "created")
    private LocalDateTime gmtCreate;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间 yyyy-MM-dd HH:mm:ss", example = "2020-11-28 00:12:23", required = true)
    @JsonFormat(timezone = "GMT+8", shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "modified")
    private LocalDateTime gmtModified;

    /**
     * 是否已删除
     * 0：未删除
     * 1：已删除
     */
    @TableLogic
    @JsonIgnore
    @TableField(value = "is_delete")
    private Integer isDelete;

    @ApiModelProperty("商品描述")
    private String message;

    @ApiModelProperty("商品名称")
    private String proname;

    @ApiModelProperty("商家id")
    private Long userId;

    @ApiModelProperty("商品所属于的一级分类id")
    private Long categoryIdOne;

    @ApiModelProperty("商品所属于的二级分类id")
    private Long categoryIdTwo;

    @ApiModelProperty("商品所属于的三级分类id")
    private Long categoryIdThree;

    @ApiModelProperty("商品单元的总销量")
    private Integer sellnum;

}
